package org.example.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.entity.Review;
import org.example.entity.UserProject;
import org.example.mapper.ReviewMapper;
import org.example.mapper.UserprojectMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class UserProjectService extends ServiceImpl<UserprojectMapper, UserProject> {
    @Resource
    UserprojectMapper userprojectMapper;
    public List<UserProject> selectUserProject(String userName){
        return userprojectMapper.selcetUserProject(userName);
    }

    public List<String> selectUserProject2(String username, String s) {
        return userprojectMapper.selectUserProject2(username,s);
    }

    public UserProject existsByProjectNameAndUserNameAndStates(String project, String username, String s) {
        return userprojectMapper.existsByProjectNameAndUserNameAndStates(project,username,s);
    }

    public List<UserProject> selectprojectstudent(String projectName) {
        return userprojectMapper.selectprojectstudent(projectName);
    }

    public void updatestate(String projectName) {
        userprojectMapper.updatestate(projectName);
    }

    public List<UserProject> selectprojectstudentss(String projectName, String name) {
        return userprojectMapper.selectprojectstudentss(projectName,name);
    }
}
